module.exports = async function (ctx) {
  let cookieId = ctx.cookies.get('token')
  ctx.cookies.set('token', '', { sigined: false, maxAge: 0 })
  ctx.session[cookieId] = null

  console.log('exit', cookieId)

  ctx.response.status = 401
  ctx.body = {
    code: 401,
    message: '用户登出成功',
    loginUrl: '/login'
  }
}